using System;
using System.Collections.Generic;
using System.Text;

namespace GPSCore
{
    /// <summary>
    /// A Collection of detectable Satellites
    /// </summary>
    public class SatelliteCollection: List<Satellite>
    {
        #region indexer

        /// <summary>
        /// Index by PRN
        /// </summary>
        /// <param name="PRN"></param>
        /// <returns></returns>
        public Satellite this[int PRN]
        { 
            get
            {
                foreach( Satellite st in this )
                {
                    if (st.PseudoRandomNumber == PRN)
                        return st;
                }

                return null;
            }
        }

        #endregion
    }
}